<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>店铺详情</title>
    <link rel="shortcut icon" href="../static/favicon.ico" />
    <link rel="bookmark" href="/favicon.ico" />
    <link rel="stylesheet" type="text/css" href="../static/css/base.css">
    <link rel="stylesheet" type="text/css" href="../static/css/detail.css">
</head>

<body>
    <header>
        <div class="container clearfix" id="top">
            <a href="index.html"><img class="logo" src="../static/img/logo.png"></a>
            <a class="topbar-item active" href="index.html">首页</a>
            <a class="topbar-item " href="category.html">商铺分类</a>
            <a class="topbar-item" href="my.html">个人中心</a>
            <nav>
                <a href="register.html">注册</a>
                <span>|</span>
                <a href="login.html">登录</a>
            </nav>
        </div>
    </header>
    <a id="toTop"  title="回到顶部"><img src="../static/img/scroll_top1.png"></a>
    <div class="main-box">
        <div class="nav clearfix">
            <div class="fl clearfix nav-des">
                <img src="../static/img/demo.jpg" class="fl">
                <div class="fl nav-des-text">
                    <h2 class="ellipsis" title="华莱士（炸鸡汉堡文沃店）">华莱士（炸鸡汉堡文沃店）</h2>
                    <div class="rank clearfix">
                        <span class="star-ranking fl">
                                <!-- 5颗星72px长度，算此时星级的长度 -->
                                <!-- 算出空白填充的部分长度 -->
                                <span class="star-score" style="width:67.68px;"></span>
                        </span>
                        <span class="score-num fl">4.7分</span>
                    </div>
                </div>
            </div>
            <div class="fr clearfix nav-right">
                <div class="fl nav-right-blast line-right">
                    <p>20<span>元</span></p>
                    <span>起送</span>
                </div>
                <div class="fl nav-right-blast line-right">
                    <p>37<span style="font-size:12px;color:#999;">分钟</span></p>
                    <span>平均送餐时间</span>
                </div>
                <div class="fl nav-right-blast  line-right">
                    <p>2<span style="font-size:12px;color:#999;">元</span></p>
                    <span>配送费</span>
                </div>
                <div class="fl nav-right-collect">
                    <div id="like" class="not-collect" title="收藏餐厅"></div>
                    <div id="review-text">未收藏</div>
                </div>
            </div>
            <div class="rest-info-down-wrap">
                <svg style="position: absolute; width: 0; height: 0; overflow: hidden;" version="1.1" xmlns="https://www.w3.org/2000/svg">
                    <defs>
                        <symbol id="icon-Shape-Copy" viewBox="0 0 32 32">
                            <path d="M25.387 21.12l-8.32 10.453c-0.64 0.853-1.707 0.853-2.347 0l-8.32-10.453c-1.92-2.133-3.2-5.12-3.2-8.32 0-7.040 5.76-12.587 12.8-12.587s12.8 5.547 12.8 12.587c0 3.2-1.28 5.973-3.413 8.32v0zM16 6.187c-3.627 0-6.4 2.773-6.4 6.4 0 3.413 2.773 6.4 6.4 6.4s6.4-2.773 6.4-6.4c0-3.413-2.773-6.4-6.4-6.4v0z"></path>
                        </symbol>
                        <symbol id="icon-Fill-2" viewBox="0 0 32 32">
                            <path d="M7.467 2.133c-1.493 0-5.333 2.773-5.333 5.547 0 7.68 13.867 22.187 22.4 22.187 2.347 0 5.333-2.56 5.333-5.547 0-1.067-6.187-5.547-7.467-5.547-1.493 0-2.56 1.28-3.84 1.28s-6.827-5.76-6.827-7.040c0-1.493 1.28-2.133 1.28-3.627-0.213-0.853-4.053-7.253-5.547-7.253z"></path>
                        </symbol>
                        <symbol id="icon-Combined-Shape" viewBox="0 0 32 32">
                            <path d="M16 2.133c-7.68 0-13.867 6.187-13.867 13.867s6.187 13.867 13.867 13.867 13.867-6.187 13.867-13.867-6.187-13.867-13.867-13.867zM22.4 23.893l-7.467-6.827v-10.667h2.133v9.173l6.827 6.827-1.493 1.493z"></path>
                        </symbol>
                    </defs>
                </svg>
                <div class="clearfix sale-time">
                    <p class="poi-detail-left"><svg class="icon-Combined-Shape">
                            <use xlink:href="#icon-Combined-Shape"></use>
                        </svg><span>营业时间</span></p>
                    <p class="poi-detail-right"><span class="info-detail">00:01-02:00,08:15-23:30</span></p>
                </div>
                <div class="rest-info-thirdpart poi-address">
                    <p class="poi-detail-left"><svg class="icon-Shape-Copy">
                            <use xlink:href="#icon-Shape-Copy"></use>
                        </svg><span class="poi-address-title">商家地址</span></p>
                    <p class="poi-detail-right">铜山新区上海路北延长段西侧28#-101</p>
                </div>
                <div class="telephone">
                    <p class="poi-detail-left"><svg class="icon-Fill-2">
                            <use xlink:href="#icon-Fill-2"></use>
                        </svg>商家电话</p>
                    <p class="poi-detail-right">051683888523/13885840035</p>
                </div>
            </div>
        </div>
        <div class="food-list">
            <div class="cate-tab-area">
                <div class="tab-link">
                    <div class="tab-link-inner clearfix">
                        <a href="#" class="tab-item  active">菜单</a>
                        <a href="#" class="tab-item ">评价</a>
                    </div>
                </div>
                <div class="ori-foodtype-nav clearfix">
                    <ul class="clearfix">
                        <li>
                            <a href="#index1" class="type" title="🙏进店必看">
                                <span class="name">
                        🙏进店必看
                        
                                </span>
                            </a>
                        </li>
                        <li>
                            <a href="#index2" class="type" title="助力套餐">
                                <span class="name">
                        助力套餐
                    
                                </span>
                            </a>
                        </li>
                        <li>
                            <a href="#index3" class="type" title="👦超值精选套餐">
                                <span class="name">
                        👦超值精选
                        ...
                                </span>
                            </a>
                        </li>
                        <li>
                            <a href="#index4" class="type" title="满减套餐">
                                <span class="name">
                        满减套餐
                        
                                </span>
                            </a>
                        </li>
                        <li>
                            <a href="javascript:;" class="type" title="👫经典多人餐">
                                <span class="name">
                        👫经典多人
                        ...
                                </span>
                            </a>
                        </li>
                        <li>
                            <a href="javascript:;" class="type" title="🍔满减主食🍔">
                                <span class="name">
                        🍔满减主食
                        ...
                                </span>
                            </a>
                        </li>
                        <li>
                            <a href="javascript:;" class="type" title="🍟休闲小食🍡">
                                <span class="name">
                        🍟休闲小食
                        ...
                                </span>
                            </a>
                        </li>
                        <li>
                            <a href="javascript:;" class="type" title="🍸倾心饮品☕">
                                <span class="name">
                        🍸倾心饮品
                        ...
                                </span>
                            </a>
                        </li>
                        <li>
                            <a href="javascript:;" class="type" title="会员日专栏">
                                <span class="name">
                        会员日专栏
                        
                                </span>
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="food-nav">
                <div class="category" id="index1">
                    <h3 class="title title-0" title="🙏进店必看">
                        <span class="tag-na"> 🙏进店必看</span>
                    </h3>
                    <div class="foods">
                        <div class="j-pic-food pic-food">
                            <div class="avatar">
                              <img src="" class="food-shape scroll-loading" alt="">
                            </div>
                            <div class="np clearfix">
                              <span class="name fl" title="双层鸡排堡">
                                双层鸡排堡
                              </span>
                            </div>
                            <div class="labels clearfix">
                                <div class="price fl">
                                    <div class="only">¥<span>14.99</span></div>
                                </div>
                                <a class="add-cart" title="添加到购物车"></a>
                            </div>
                        </div>
                        <div class="j-pic-food pic-food">
                            <div class="avatar">
                              <img src="" class="food-shape scroll-loading" alt="">
                            </div>
                            <div class="np clearfix">
                              <span class="name fl" title="双层鸡排堡">
                                一个上校鸡块(5份起)
                              </span>
                            </div>
                            <div class="labels clearfix">
                                <a class="add-cart" title="添加到购物车"></a>
                                <div class="price fl">
                                    <div class="only">¥<span>2</span></div>
                                </div>
                            </div>
                        </div>
                        <div class="j-pic-food pic-food pic-food-col2">
                            <div class="avatar">
                              <img src="" class="food-shape scroll-loading" alt="">
                            </div>
                            <div class="np clearfix">
                              <span class="name fl" title="双层鸡排堡">
                                汉堡果汁餐
                              </span>
                            </div>
                            <div class="labels clearfix">
                                <a class="add-cart" title="添加到购物车"></a>
                                <div class="price fl">
                                    <div class="only">¥<span>20.9</span></div>
                                </div>
                            </div>
                        </div>
                        <div class="j-pic-food pic-food">
                            <div class="avatar">
                              <img src="" class="food-shape scroll-loading" alt="">
                            </div>
                            <div class="np clearfix">
                              <span class="name fl" title="双层鸡排堡">
                                专享吃鸡套餐
                              </span>
                            </div>
                            <div class="labels clearfix">
                                <a class="add-cart" title="添加到购物车"></a>
                                <div class="price fl">
                                    <div class="only">¥<span>41.99</span></div>
                                </div>
                            </div>
                        </div>
                        <div class="j-pic-food pic-food">
                            <div class="avatar">
                              <img src="" class="food-shape scroll-loading" alt="">
                            </div>
                            <div class="np clearfix">
                              <span class="name fl" title="双层鸡排堡">
                                双卷能量餐
                              </span>
                            </div>
                            <div class="labels clearfix">
                                <a class="add-cart" title="添加到购物车"></a>
                                <div class="price fl">
                                    <div class="only">¥<span>30.9</span></div>
                                </div>
                            </div>
                        </div>
                        <div class="j-pic-food pic-food pic-food-col2">
                            <div class="avatar">
                              <img src="" class="food-shape scroll-loading" alt="">
                            </div>
                            <div class="np clearfix">
                              <span class="name fl" title="双层鸡排堡">
                                汉堡鸡米花餐
                              </span>
                            </div>
                            <div class="labels clearfix">
                                <a class="add-cart" title="添加到购物车"></a>
                                <div class="price fl">
                                    <div class="only">¥<span>27.8</span></div>
                                </div>
                            </div>
                        </div>
                        <div class="j-pic-food pic-food">
                            <div class="avatar">
                              <img src="" class="food-shape scroll-loading" alt="">
                            </div>
                            <div class="np clearfix">
                              <span class="name fl" title="双层鸡排堡">
                                两个香辣鸡腿堡
                              </span>
                            </div>
                            <div class="labels clearfix">
                                <a class="add-cart" title="添加到购物车"></a>
                                <div class="price fl">
                                    <div class="only">¥<span>29.8</span></div>
                                </div>
                            </div>
                        </div>
                        <div class="j-pic-food pic-food">
                            <div class="avatar">
                              <img src="" class="food-shape scroll-loading" alt="">
                            </div>
                            <div class="np clearfix">
                              <span class="name fl" title="双层鸡排堡">
                                香辣鸡腿堡
                              </span>
                            </div>
                            <div class="labels clearfix">
                                <a class="add-cart" title="添加到购物车"></a>
                                <div class="price fl">
                                    <div class="only">¥<span>14.9</span></div>
                                </div>
                            </div>
                        </div>
                        <div class="j-pic-food pic-food">
                            <div class="avatar">
                              <img src="" class="food-shape scroll-loading" alt="">
                            </div>
                            <div class="np clearfix">
                              <span class="name fl" title="双层鸡排堡">
                                华趣孜然扒翅餐
                              </span>
                            </div>
                            <div class="labels clearfix">
                                <a class="add-cart" title="添加到购物车"></a>
                                <div class="price fl">
                                    <div class="only">¥<span>36</span></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>     
                <div class="category" id="index2">
                    <h3 class="title title-0" title="🙏进店必看">
                        <span class="tag-na"> 助力套餐</span>
                    </h3>
                    <div class="foods">
                        <div class="j-pic-food pic-food">
                            <div class="avatar">
                              <img src="" class="food-shape scroll-loading" alt="">
                            </div>
                            <div class="np clearfix">
                              <span class="name fl" title="双层鸡排堡">
                                双层鸡排堡
                              </span>
                            </div>
                            <div class="labels clearfix">
                                <a class="add-cart" title="添加到购物车"></a>
                                <div class="price fl">
                                    <div class="only">¥<span>10.8</span></div>
                                </div>
                            </div>
                        </div>
                        <div class="j-pic-food pic-food">
                            <div class="avatar">
                              <img src="" class="food-shape scroll-loading" alt="">
                            </div>
                            <div class="np clearfix">
                              <span class="name fl" title="双层鸡排堡">
                                双层鸡排堡
                              </span>
                            </div>
                            <div class="labels clearfix">
                                <a class="add-cart" title="添加到购物车"></a>
                                <div class="price fl">
                                    <div class="only">¥<span>10.8</span></div>
                                </div>
                            </div>
                        </div>
                        <div class="j-pic-food pic-food pic-food-col2">
                            <div class="avatar">
                              <img src="" class="food-shape scroll-loading" alt="">
                            </div>
                            <div class="np clearfix">
                              <span class="name fl" title="双层鸡排堡">
                                双层鸡排堡
                              </span>
                            </div>
                            <div class="labels clearfix">
                                <a class="add-cart" title="添加到购物车"></a>
                                <div class="price fl">
                                    <div class="only">¥<span>10.8</span></div>
                                </div>
                            </div>
                        </div>
                        <div class="j-pic-food pic-food">
                            <div class="avatar">
                              <img src="" class="food-shape scroll-loading" alt="">
                            </div>
                            <div class="np clearfix">
                              <span class="name fl" title="双层鸡排堡">
                                双层鸡排堡
                              </span>
                            </div>
                            <div class="labels clearfix">
                                <a class="add-cart" title="添加到购物车"></a>
                                <div class="price fl">
                                    <div class="only">¥<span>10.8</span></div>
                                </div>
                            </div>
                        </div>
                        <div class="j-pic-food pic-food">
                            <div class="avatar">
                              <img src="" class="food-shape scroll-loading" alt="">
                            </div>
                            <div class="np clearfix">
                              <span class="name fl" title="双层鸡排堡">
                                双层鸡排堡
                              </span>
                            </div>
                            <div class="labels clearfix">
                                <a class="add-cart" title="添加到购物车"></a>
                                <div class="price fl">
                                    <div class="only">¥<span>10.8</span></div>
                                </div>
                            </div>
                        </div>
                        <div class="j-pic-food pic-food pic-food-col2">
                            <div class="avatar">
                              <img src="" class="food-shape scroll-loading" alt="">
                            </div>
                            <div class="np clearfix">
                              <span class="name fl" title="双层鸡排堡">
                                双层鸡排堡
                              </span>
                            </div>
                            <div class="labels clearfix">
                                <a class="add-cart" title="添加到购物车"></a>
                                <div class="price fl">
                                    <div class="only">¥<span>10.8</span></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="category" id="index3">
                    <h3 class="title title-0" title="🙏进店必看">
                        <span class="tag-na">👦超值精选套餐</span>
                    </h3>
                    <div class="foods">
                        <div class="j-pic-food pic-food">
                            <div class="avatar">
                              <img src="" class="food-shape scroll-loading" alt="">
                            </div>
                            <div class="np clearfix">
                              <span class="name fl" title="双层鸡排堡">
                                双层鸡排堡
                              </span>
                            </div>
                            <div class="labels clearfix">
                                <a class="add-cart" title="添加到购物车"></a>
                                <div class="price fl">
                                    <div class="only">¥<span>10.8</span></div>
                                </div>
                            </div>
                        </div>
                        <div class="j-pic-food pic-food">
                            <div class="avatar">
                              <img src="" class="food-shape scroll-loading" alt="">
                            </div>
                            <div class="np clearfix">
                              <span class="name fl" title="双层鸡排堡">
                                双层鸡排堡
                              </span>
                            </div>
                            <div class="labels clearfix">
                                <a class="add-cart" title="添加到购物车"></a>
                                <div class="price fl">
                                    <div class="only">¥<span>10.8</span></div>
                                </div>
                            </div>
                        </div>
                        <div class="j-pic-food pic-food pic-food-col2">
                            <div class="avatar">
                              <img src="" class="food-shape scroll-loading" alt="">
                            </div>
                            <div class="np clearfix">
                              <span class="name fl" title="双层鸡排堡">
                                双层鸡排堡
                              </span>
                            </div>
                            <div class="labels clearfix">
                                <a class="add-cart" title="添加到购物车"></a>
                                <div class="price fl">
                                    <div class="only">¥<span>10.8</span></div>
                                </div>
                            </div>
                        </div>
                        <div class="j-pic-food pic-food">
                            <div class="avatar">
                              <img src="" class="food-shape scroll-loading" alt="">
                            </div>
                            <div class="np clearfix">
                              <span class="name fl" title="双层鸡排堡">
                                双层鸡排堡
                              </span>
                            </div>
                            <div class="labels clearfix">
                                <a class="add-cart" title="添加到购物车"></a>
                                <div class="price fl">
                                    <div class="only">¥<span>10.8</span></div>
                                </div>
                            </div>
                        </div>
                        <div class="j-pic-food pic-food">
                            <div class="avatar">
                              <img src="" class="food-shape scroll-loading" alt="">
                            </div>
                            <div class="np clearfix">
                              <span class="name fl" title="双层鸡排堡">
                                双层鸡排堡
                              </span>
                            </div>
                            <div class="labels clearfix">
                                <a class="add-cart" title="添加到购物车"></a>
                                <div class="price fl">
                                    <div class="only">¥<span>10.8</span></div>
                                </div>
                            </div>
                        </div>
                        <div class="j-pic-food pic-food pic-food-col2">
                            <div class="avatar">
                              <img src="" class="food-shape scroll-loading" alt="">
                            </div>
                            <div class="np clearfix">
                              <span class="name fl" title="双层鸡排堡">
                                双层鸡排堡
                              </span>
                            </div>
                            <div class="labels clearfix">
                                <a class="add-cart" title="添加到购物车"></a>
                                <div class="price fl">
                                    <div class="only">¥<span>10.8</span></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="category" id="index4">
                    <h3 class="title title-0" title="🙏进店必看">
                        <span class="tag-na">满减套餐</span>
                    </h3>
                    <div class="foods">
                        <div class="j-pic-food pic-food">
                            <div class="avatar">
                              <img src="" class="food-shape scroll-loading" alt="">
                            </div>
                            <div class="np clearfix">
                              <span class="name fl" title="双层鸡排堡">
                                双层鸡排堡
                              </span>
                            </div>
                            <div class="labels clearfix">
                                <a class="add-cart" title="添加到购物车"></a>
                                <div class="price fl">
                                    <div class="only">¥<span>10.8</span></div>
                                </div>
                            </div>
                        </div>
                        <div class="j-pic-food pic-food">
                            <div class="avatar">
                              <img src="" class="food-shape scroll-loading" alt="">
                            </div>
                            <div class="np clearfix">
                              <span class="name fl" title="双层鸡排堡">
                                双层鸡排堡
                              </span>
                            </div>
                            <div class="labels clearfix">
                                <a class="add-cart" title="添加到购物车"></a>
                                <div class="price fl">
                                    <div class="only">¥<span>10.8</span></div>
                                </div>
                            </div>
                        </div>
                        <div class="j-pic-food pic-food pic-food-col2">
                            <div class="avatar">
                              <img src="" class="food-shape scroll-loading" alt="">
                            </div>
                            <div class="np clearfix">
                              <span class="name fl" title="双层鸡排堡">
                                双层鸡排堡
                              </span>
                            </div>
                            <div class="labels clearfix">
                                <a class="add-cart" title="添加到购物车"></a>
                                <div class="price fl">
                                    <div class="only">¥<span>10.8</span></div>
                                </div>
                            </div>
                        </div>
                        <div class="j-pic-food pic-food">
                            <div class="avatar">
                              <img src="" class="food-shape scroll-loading" alt="">
                            </div>
                            <div class="np clearfix">
                              <span class="name fl" title="双层鸡排堡">
                                双层鸡排堡
                              </span>
                            </div>
                            <div class="labels clearfix">
                                <a class="add-cart" title="添加到购物车"></a>
                                <div class="price fl">
                                    <div class="only">¥<span>10.8</span></div>
                                </div>
                            </div>
                        </div>
                        <div class="j-pic-food pic-food">
                            <div class="avatar">
                              <img src="" class="food-shape scroll-loading" alt="">
                            </div>
                            <div class="np clearfix">
                              <span class="name fl" title="双层鸡排堡">
                                双层鸡排堡
                              </span>
                            </div>
                            <div class="labels clearfix">
                                <a class="add-cart" title="添加到购物车"></a>
                                <div class="price fl">
                                    <div class="only">¥<span>10.8</span></div>
                                </div>
                            </div>
                        </div>
                        <div class="j-pic-food pic-food pic-food-col2">
                            <div class="avatar">
                              <img src="" class="food-shape scroll-loading" alt="">
                            </div>
                            <div class="np clearfix">
                              <span class="name fl" title="双层鸡排堡">
                                双层鸡排堡
                              </span>
                            </div>
                            <div class="labels clearfix">
                                <a class="add-cart" title="添加到购物车"></a>
                                <div class="price fl">
                                    <div class="only">¥<span>10.8</span></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div> 
            </div>  
            <div class="comments hide">
                <div class="title clearfix">
                    <div class="clearfix filters">
                        <label class="fl"><input name="category" type="radio" value="all" checked="checked"><span>全部评价 <em>(15342)</em></span></label>
                        <label class="fl"><input name="category" type="radio" value="good"><span>好评 <em>(14736)</em></span></label>
                        <label class="fl"><input name="category" type="radio" value="bad"><span>差评 <em>(354)</em></span></label>
                    </div>
                </div>
                <div class="comments-list">
                    <article class="comment-item">
                        <span class="date fr">2018-05-01 15:09:14</span>
                        <div class="rank clearfix fr">
                            <span class="star-ranking fl">
                                    <!-- 5颗星72px长度，算此时星级的长度 -->
                                    <!-- 算出空白填充的部分长度 -->
                                    <span class="star-score" style="width:72px;"></span>
                            </span>
                        </div>
                        <img src="../static/img/avatar.jpg" class="user_avatar">
                        <span class="user_phone">178****5357</span>
                    </article>
                    <article class="comment-item">
                        <span class="date fr">2018-05-01 15:09:14</span>
                        <div class="rank clearfix fr">
                            <span class="star-ranking fl">
                                    <!-- 5颗星72px长度，算此时星级的长度 -->
                                    <!-- 算出空白填充的部分长度 -->
                                    <span class="star-score" style="width:72px;"></span>
                            </span>
                        </div>
                        <img src="../static/img/avatar.jpg" class="user_avatar">
                        <span class="user_phone">178****5357</span>
                    </article>
                    <article class="comment-item">
                        <span class="date fr">2018-05-01 15:09:14</span>
                        <div class="rank clearfix fr">
                            <span class="star-ranking fl">
                                    <!-- 5颗星72px长度，算此时星级的长度 -->
                                    <!-- 算出空白填充的部分长度 -->
                                    <span class="star-score" style="width:72px;"></span>
                            </span>
                        </div>
                        <img src="../static/img/avatar.jpg" class="user_avatar">
                        <span class="user_phone">178****5357</span>
                    </article>
                    <article class="comment-item">
                        <span class="date fr">2018-05-01 15:09:14</span>
                        <div class="rank clearfix fr">
                            <span class="star-ranking fl">
                                    <!-- 5颗星72px长度，算此时星级的长度 -->
                                    <!-- 算出空白填充的部分长度 -->
                                    <span class="star-score" style="width:72px;"></span>
                            </span>
                        </div>
                        <img src="../static/img/avatar.jpg" class="user_avatar">
                        <span class="user_phone">178****5357</span>
                    </article>
                    <article class="comment-item">
                        <span class="date fr">2018-05-01 15:09:14</span>
                        <div class="rank clearfix fr">
                            <span class="star-ranking fl">
                                    <!-- 5颗星72px长度，算此时星级的长度 -->
                                    <!-- 算出空白填充的部分长度 -->
                                    <span class="star-score" style="width:72px;"></span>
                            </span>
                        </div>
                        <img src="../static/img/avatar.jpg" class="user_avatar">
                        <span class="user_phone">178****5357</span>
                    </article>
                    <article class="comment-item">
                        <span class="date fr">2018-05-01 15:09:14</span>
                        <div class="rank clearfix fr">
                            <span class="star-ranking fl">
                                    <!-- 5颗星72px长度，算此时星级的长度 -->
                                    <!-- 算出空白填充的部分长度 -->
                                    <span class="star-score" style="width:72px;"></span>
                            </span>
                        </div>
                        <img src="../static/img/avatar.jpg" class="user_avatar">
                        <span class="user_phone">178****5357</span>
                    </article>
                    <article class="comment-item">
                        <span class="date fr">2018-05-01 15:09:14</span>
                        <div class="rank clearfix fr">
                            <span class="star-ranking fl">
                                    <!-- 5颗星72px长度，算此时星级的长度 -->
                                    <!-- 算出空白填充的部分长度 -->
                                    <span class="star-score" style="width:72px;"></span>
                            </span>
                        </div>
                        <img src="../static/img/avatar.jpg" class="user_avatar">
                        <span class="user_phone">178****5357</span>
                    </article>
                    <article class="comment-item">
                        <span class="date fr">2018-05-01 15:09:14</span>
                        <div class="rank clearfix fr">
                            <span class="star-ranking fl">
                                    <!-- 5颗星72px长度，算此时星级的长度 -->
                                    <!-- 算出空白填充的部分长度 -->
                                    <span class="star-score" style="width:72px;"></span>
                            </span>
                        </div>
                        <img src="../static/img/avatar.jpg" class="user_avatar">
                        <span class="user_phone">178****5357</span>
                    </article>
                    <article class="comment-item">
                        <span class="date fr">2018-05-01 15:09:14</span>
                        <div class="rank clearfix fr">
                            <span class="star-ranking fl">
                                    <!-- 5颗星72px长度，算此时星级的长度 -->
                                    <!-- 算出空白填充的部分长度 -->
                                    <span class="star-score" style="width:72px;"></span>
                            </span>
                        </div>
                        <img src="../static/img/avatar.jpg" class="user_avatar">
                        <span class="user_phone">178****5357</span>
                    </article>
                    <article class="comment-item">
                        <span class="date fr">2018-05-01 15:09:14</span>
                        <div class="rank clearfix fr">
                            <span class="star-ranking fl">
                                    <!-- 5颗星72px长度，算此时星级的长度 -->
                                    <!-- 算出空白填充的部分长度 -->
                                    <span class="star-score" style="width:72px;"></span>
                            </span>
                        </div>
                        <img src="../static/img/avatar.jpg" class="user_avatar">
                        <span class="user_phone">178****5357</span>
                    </article>
                    <article class="comment-item">
                        <span class="date fr">2018-05-01 15:09:14</span>
                        <div class="rank clearfix fr">
                            <span class="star-ranking fl">
                                    <!-- 5颗星72px长度，算此时星级的长度 -->
                                    <!-- 算出空白填充的部分长度 -->
                                    <span class="star-score" style="width:72px;"></span>
                            </span>
                        </div>
                        <img src="../static/img/avatar.jpg" class="user_avatar">
                        <span class="user_phone">178****5357</span>
                    </article>
                    <article class="comment-item">
                        <span class="date fr">2018-05-01 15:09:14</span>
                        <div class="rank clearfix fr">
                            <span class="star-ranking fl">
                                    <!-- 5颗星72px长度，算此时星级的长度 -->
                                    <!-- 算出空白填充的部分长度 -->
                                    <span class="star-score" style="width:72px;"></span>
                            </span>
                        </div>
                        <img src="../static/img/avatar.jpg" class="user_avatar">
                        <span class="user_phone">178****5357</span>
                    </article>
                </div>
                <ul class="pager">
                    <li class="pager-first first">
                        <span>« 首页</span>
                    </li>
                    <li class="pager-previous">
                        <span>上一页</span>
                    </li>
                    <li class="pager-current">1</li>
                    <li class="pager-item">
                        <a href="">2</a>
                    </li>
                    <li class="pager-item">
                        <a href="">3</a>
                    </li>
                    <li class="pager-item">
                        <a href="">4</a>
                    </li>
                    <li class="pager-item">
                        <a href="">5</a>
                    </li>
                    <li class="pager-next">
                        <span>下一页</span>
                    </li>
                    <li class="pager-last last">
                        <span>尾页 »</span>
                    </li>
                </ul>
            </div>    
        </div>
        <div class="cart ">   
            <div class="cart-header">
                <h5>购物车<i class="trash-can-icon fr"></i></h5>
            </div>
            <section>
                <div class="inner-cart">
                    <div class="cart-thead clearfix">
                        <div class="goods-name">商品名</div>
                        <div class="goods-count">份数</div>
                        <div class="goods-price">单价</div>
                        <div class="goods-subtotal">小计</div>
                    </div>
                    <div class="cart-item-empty">暂无商品，请在左边的菜单上点单</div>
                    <div id="cart-item-list">


                    </div>
                    <div class="total clearfix hide">
                        <div class="fl">配送费：￥<span id="delivery_fee">2.00</span></div>
                        <div class="fr">合计：￥<span id="total_fee">0</span></div>
                    </div>
                    <div class="checkout" id="not-order">
                        <button class="btn" disabled="disabled">还差<span id="need_fee">20</span>元起送</button>
                    </div>
                    <div class="checkout hide" id="can-order">
                        <button id="order" class="available-btn">点击下单</button>
                    </div>
                </div>
            </section>
        </div>     
        <div class="rank fr hide">
          <div class="title">总体评分</div>
          <div class="head clearfix">
            <strong class="fl">4.7</strong>
            <span class="star-ranking fl">
              <span class="star-score" style="width:141px"></span>
            </span>
          </div>
          <div class="detail">
              <div class="field clearfix">
                <span class="fl score-num">
                    5分
                </span>
                <span class="fl bar"><i style="width: 81%;"></i></span>
                <span class="fr percent">81%</span>
              </div>
              <div class="field clearfix">
                <span class="fl score-num">
                    4分
                </span>
                <span class="fl bar"><i style="width: 10%;"></i></span>
                <span class="fr percent">10%</span>
              </div>
              <div class="field clearfix">
                <span class="fl score-num">
                    3分
                </span>
                <span class="fl bar"><i style="width: 5%;"></i></span>
                <span class="fr percent">5%</span>
              </div>
              <div class="field clearfix">
                <span class="fl score-num">
                    2分
                </span>
                <span class="fl bar"><i style="width: 2%;"></i></span>
                <span class="fr percent">2%</span>
              </div>
              <div class="field clearfix">
                <span class="fl score-num">
                    1分
                </span>
                <span class="fl bar"><i style="width: 2%;"></i></span>
                <span class="fr percent">2%</span>
              </div>
          </div>
        </div>   
    </div>
    <script type="text/javascript" src="../static/js/jquery-3.3.1.min.js"></script>
    <script type="text/javascript" src="../static/js/base.js"></script>
    <script type="text/javascript">
    $(function() {

        // 起送费
        var need_num = least_price = 20;
        // 配送费
        var delivery_fee = 2;

        $('#like').click(function() {
            $(this).toggleClass('collect');
            var like_text = $('#review-text');
            if (like_text.text() == '未收藏') {
                like_text.text('已收藏');
            } else {
                like_text.text('未收藏');
            }
        })

        $('.nav-des').hover(function() {
            $('.rest-info-down-wrap').css({
                'display': 'block'
            });
        })
        $('.nav-des').mouseleave(function() {
            $('.rest-info-down-wrap').css({
                'display': 'none'
            });
        })

        function trim(str){ //删除左右两端的空格
    　　    return str.replace(/(^\s*)|(\s*$)/g,"");
    　　}

        // 添加购物车

        $('.add-cart').on('click',function(){
            var flag = 0;
            var total = 0;
            var goods_num = null;
            var item = $(this).parent().parent();
            var name = trim(item.find('.name').text());
            var price = trim(item.find('.only span').text());

            // 判断购物车中是否已经包含该商品
            $('#cart-item-list').find('.cart-item').each(function(){
                if($(this).find('.goods-name').text()==name){
                    goods_num = $(this).find('.goods-nums');
                    flag = 1 ;
                    return;
                }
            })
            if(flag == 1){
                goods_num.text(parseInt(goods_num.text())+1);
                iteamUpdate(goods_num.parent().parent(),parseInt(goods_num.text()))

            }else{
                $('#cart-item-list').append('<div class="cart-item clearfix"><div class="goods-name ellipsis" title="'+name+'">'+name+'</div><div class="goods-count clearfix ellipsis"><span class="sub-icon fl">-</span><span class="goods-nums fl">1</span><span class="add-icon fl">+</span></div><div class="goods-price">￥<span>'+price+'</span></div><div class="goods-subtotal">￥<span>'+price+'</span></div></div>');
            }
            
            if($('#cart-item-list').children().length==0){
                $('.total').addClass('hide')
                $('.cart-item-empty').removeClass('hide')
                console.log('hhh')
                $('#need_fee').text(least_price)
            }else{
                $('.total').removeClass('hide')
                $('.cart-item-empty').addClass('hide')
                                console.log('hhh')
            }      
            item.parent().parent().parent().parent().parent().find('#cart-item-list').find('.cart-item').each(function(){
                total = total + parseFloat($(this).find('.goods-subtotal span').text());
            })   
            $('#total_fee').text((total+delivery_fee).toFixed(2));
            canOrder();
        })


        //下单按钮
        function canOrder(){
            var total_fee = parseFloat($('#total_fee').text());
            console.log(total_fee)
            console.log(need_num)
            need_fee = $('#need_fee');
            if( total_fee >= least_price){
                $('#not-order').addClass('hide');
                $('#can-order').removeClass('hide');
            }else{
                $('#not-order').removeClass('hide');
                $('#can-order').addClass('hide');
                need_fee.text((least_price - total_fee).toFixed(2));
                need_num = (least_price - total_fee).toFixed(2);
            }
        }
        $('#order').click(function(){
            window.location.href="order.html";
        })

        // 更新价格

        function iteamUpdate(cartItem,num){
            var total=0;
            var price = parseFloat(cartItem.find('.goods-price span').text());
            cartItem.find('.goods-subtotal span').text((price*num).toFixed(2));
            $('#cart-item-list').find('.cart-item').each(function(){
                total = total + parseFloat($(this).find('.goods-subtotal span').text());
            })
            $('#total_fee').text((total+delivery_fee).toFixed(2));
            if($('#cart-item-list').children().length==0){
                $('.total').addClass('hide')
                $('.cart-item-empty').removeClass('hide')
            }else{
                $('.total').removeClass('hide')
                $('.cart-item-empty').addClass('hide')
            }
            canOrder();
        }

       

        // 购物加减
        $('#cart-item-list').on('click','.add-icon',function(){
            var num = $(this).parent().find('.goods-nums');
            num.text(parseInt(num.text())+1);
            iteamUpdate($(this).parent().parent(),parseInt(num.text()));
        })
        $('#cart-item-list').on('click','.sub-icon',function(){
            var num = $(this).parent().find('.goods-nums');
            num.text(parseInt(num.text())-1);
            if(num.text() == '0'){
                $(this).parent().parent().remove();
            }
            iteamUpdate($(this).parent().parent(),parseInt(num.text()));
        })

        // 清空购物车
        $('.trash-can-icon').on('click',function(){
            $('#total_fee').text(0);
            $('#cart-item-list').empty();
            $('.total').addClass('hide');
            $('#can-order').addClass('hide')
            $('#not-order').removeClass('hide')
            $('.cart-item-empty').removeClass('hide');
            need_num=least_price;
            canOrder();
        })

        // 购物车吸顶
        $(document).on('scroll', function() {
            var left = $('.food-list').offset().left+$('.food-list').width()+10
            scroll = $(document).scrollTop();
            if (scroll > 140) {
                $('.cart').addClass('cart-fixed');
                $('.cart').css('left',left)
            }else{
                $('.cart').removeClass('cart-fixed');               
            }
        })
                //浏览器窗口大小变化时
        $(window).resize(function() {
            var left = $('.food-list').offset().left+$('.food-list').width()+10
            $('.cart').css('left',left)
        });
        
        // 锚点跳转滚动效果
        $(".type").click(function () {

            $("html, body").animate({scrollTop: $($(this).attr("href")).offset().top -20+ "px"}, 500);

            return false;

        });

        $(".tab-link-inner a").click(function(){
            if($(this).index()==0){
                $(this).addClass('active');
                $(this).siblings().removeClass('active');
                $('.ori-foodtype-nav,.food-nav,.cart').removeClass('hide');
                $('.comments,.main-box > .rank').addClass('hide');
            }else if($(this).index()==1){
                $(this).addClass('active');
                $(this).siblings().removeClass('active');
                $('.ori-foodtype-nav,.food-nav,.cart').addClass('hide');
                $('.comments,.main-box > .rank').removeClass('hide');
            }
        })
    })
    </script>
</body>

</html>